package com.rr.mymoney.bo.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rr.mymoney.bo.TagBo;
import com.rr.mymoney.dao.TagDao;
import com.rr.mymoney.model.Tag;

@Service
public class TagBoImpl implements TagBo {
    private TagDao tagDao;

    @Autowired
    private TagBoImpl(TagDao tagDao) {
	super();
	this.tagDao = tagDao;
    }

    public void saveOrUpdate(Tag tag) {
	tagDao.saveOrUpdate(tag);
    }

    public Tag get(Long id) {
	return tagDao.get(id);
    }

    public Tag getByName(String tagName) {
	return tagDao.getByName(tagName);
    }

    public void delete(Tag tag) {
	tagDao.delete(tag);
    }

}
